$ ()->
  win    = $ window
  body   = $ document.body
  footer = $ 'footer'
  
  footerPosition = ()->
    windowHeight = win.innerHeight()
    bodyHeight   = body.height()
    footerHeight = footer.height()
    
    if windowHeight > (bodyHeight + footerHeight)
      footer.addClass 'small'
    else
      footer.removeClass 'small'
  
  footerPosition()
  win.resize footerPosition